<?php

use Illuminate\Database\Seeder;
use App\Models\Status;

class StatusesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $users = [1, 2, 3, 4, 5];
        $statuses = factory(Status::class)->times(200)->make()->each(function($status) use ($users){
            $status->user_id = array_random($users);
        });
        Status::insert($statuses->toArray());
    }
}
